home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Example of an unintelligible program in C
- Date: 20 Mar 1996 16:00:43 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4iq67bINN3gs@keats.ugrad.cs.ubc.ca>
- References: <4iegj7$evn@bee.uspnet.usp.br> <4if0i4$qsm@garden.csc.calpoly.edu> <4ij8je$lb9@charm.il.ft.hse.nl>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4ij8je$lb9@charm.il.ft.hse.nl>, robert <robert@il.ft.hse.nl> wrote:
- >dstubbs@garden.csc.calpoly.edu (Dan Stubbs):
- > >Here is one of my favorites. Guess what it does! Apply a formatter
- > >such as cb or indent to it if you really want to make it obscure.
- >
- >Here's another one:
- >main(w){float x=25,q=80,a=-2,c=-1.2,e=(1-a)/q,f=(-c-c)/x,y,g,h=c,r,i,u=x,v;for(;
- >u--;h+=f)for(v=q,g=a;v--;g+=e,putchar(w[".,:;=+itIYVXRBM "]))for(w=r=i=0;x=r,y=i
- >,r=x*x-y*y+g,i=2*x*y+h,w<15&&r*r+i*i<4;w++);}
-
- Too bad most of these programs are non-conforming.
-
- The square root example given in the earlier posting employs a variable whose
- name is the underscore character. Oops.
-
- In the above, main() is incorrectly declared---the standard requires that it
- have two arguments or none at all, the second being, of course, a pointer to
- pointer to char.
-
- What about the use of putchar without having included <stdio.h>, hmm?
-
- The exit status is undefined, also.
- --
-
-